Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for device key signatures over federation #795

Merged
merged 2 commits into from
Feb 5, 2020

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Feb 4, 2020

corresponds to matrix-org/synapse#6844

Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly just trying to format things to make it clearer to read

tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
matrix_create_room( $user1 );
})->then( sub {
( $room_id ) = @_;
matrix_sync( $user1 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to sync here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. Probably not. I think I just cargo-culted it from somewhere else. I'll try without and if it still works, I'll drop it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be necessary, for some strange reason. If I leave it off, then synapse will return a 500 at some later sync. 😨 The backtrace is:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/venv/lib/python3.5/site-packages/synapse/http/server.py", line 78, in wrapped_request_handler
    await h(self, request)
  File "/venv/lib/python3.5/site-packages/synapse/http/server.py", line 331, in _async_render
    callback_return = await callback_return
  File "/venv/lib/python3.5/site-packages/synapse/rest/client/v2_alpha/sync.py", line 178, in on_GET
    full_state=full_state,
  File "/venv/lib/python3.5/site-packages/synapse/handlers/sync.py", line 286, in wait_for_sync_for_user
    full_state,
  File "/venv/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/venv/lib/python3.5/site-packages/synapse/handlers/sync.py", line 323, in _wait_for_sync_for_user
    from_token=since_token,
  File "/venv/lib/python3.5/site-packages/synapse/notifier.py", line 352, in wait_for_events
    listener = user_stream.new_listener(prev_token)
  File "/venv/lib/python3.5/site-packages/synapse/notifier.py", line 137, in new_listener
    if self.last_notified_token.is_after(token):
  File "/venv/lib/python3.5/site-packages/synapse/types.py", line 376, in is_after
    (other.room_stream_id < self.room_stream_id)
  File "/venv/lib/python3.5/site-packages/synapse/types.py", line 371, in room_stream_id
    return int(self.room_key[1:].split("-")[-1])
ValueError: invalid literal for int() with base 10: ''

which looks like fun.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, looks like sync_until_user_in_device_list uses matrix_sync_again, which sets an empty since token

@uhoreg uhoreg requested a review from erikjohnston February 4, 2020 19:00
@uhoreg uhoreg merged commit 4bb7f49 into develop Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants